package com.cbb.admin.cbb;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.EditText;
import android.widget.TextView;

import com.cbb.utils.ToastUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class LoginActivity extends BaseActivity {

    @BindView(R.id.et_phone)
    EditText etUrl;
    @BindView(R.id.tv_login)
    TextView tvLogin;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        ButterKnife.bind(this);
        etUrl.setText("http://testgt.caibangw.com:8880/#/home");
    }

    @OnClick(R.id.tv_login)
    public void onViewClicked() {
        String url = etUrl.getText().toString().trim();
        if(TextUtils.isEmpty(url)){
            ToastUtils.show(mContext,"请输入url地址");
            return;
        }
        Intent intent = new Intent(mContext,MainActivity.class);
        intent.putExtra("url",url);
        mContext.startActivity(intent);
    }

}
